package com.cs.composite;

/**
 * @author Sam.Lee E-mail:lishanman2007@163.com
 * @version Created：Aug 16, 2011 1:20:19 PM
 */
public class Main {
	public static void main(String[] args) throws Exception {
		Component root = new Composite("服装");

		Component male = new Composite("男装");
		Component female = new Composite("女装");

		Component jack = new Leaf("夹克");
		Component cowboy = new Leaf("牛仔");
		Component skirt = new Leaf("裙子");

		male.add(jack);
		male.add(cowboy);

		female.add(skirt);

		root.add(male);
		root.add(female);
		root.printStruct("");

	}
}
